5.3.3 APPX Application Design Manual

+ Chapter 1-1: Overview of Application Design
+ Chapter 1-2: Getting Started
+ Chapter 1-3: Data Dictionary
+ Chapter 1-4: Understanding Process Design
+ Chapter 1-5: Interprocess Communication
+ Chapter 1-6: Customizing Your Application
+ Chapter 1-7: The Documentation Facility
+ Chapter 1-8: Application Design Tools
+ Chapter 2-1: Data Dictionary Overview
+ Chapter 2-2: Data Dictionary Concepts
+ Chapter 2-3: Domains
+ Chapter 2-4: Files and Fields
+ Chapter 2-5: Work Fields
+ Chapter 3-1: Overview of APPX Processes
+ Chapter 3-2: Getting Started
+ Chapter 3-3: Process Definition
+ Chapter 3-4: Menu Processes
+ Chapter 3-5: Job Processes
+ Chapter 3-6: Input Processes
+ Chapter 3-7: Output Processes
+ Chapter 3-8: Update Processes
+ Chapter 3-9: Query Processes
+ Chapter 3-10: Inquiry Processes
+ Chapter 3-11: Status Processes
+ Chapter 3-12: Subroutine Processes
+ Chapter 3-13: Table Processes
+ Chapter 3-14: Automatic and Optional Children
+ Chapter 3-15: Using the Image Editor
+ Chapter 3-16: Using GUI Features of the Image Editor
+ Chapter 3-17: Using Event Points
+ Chapter 4-1: ILF Integration
+ Chapter 4-2: True/False Status Indicators
+ Chapter 4-3: Specifying Statements
+ Chapter 4-4: The ILF Editor
+ Chapter 4-5: The Appx ILF Debugger
+ Chapter 4-6: ILF Keyword Reference
+ Chapter 4-7: Predefined Fields
- Chapter 4-8: Runtime Subroutine's and Predefined Processes
+ Chapter 4-9: Appx Chart Director API

Chapter 4-8: Runtime Subroutine's and Predefined Processes

.CONVERT TRANSLATE


This subroutine converts a string from one language to another.

Usage:

Description:

This subroutine converts a string from one language to another. The first five parameters are required, if any are missing the subroutine will CANCEL. The <trans_type>, <trans_app_id> and <trans_ver_id> parameters are optional. The translation uses the Dictionaries and Translations you have entered in the applications. Note that this routine should be invoked via SUBR with a RELATED or DETACHED invocation to ensure none of your fields are changed.

<trans_text> returns the translated version of <source_text> (Required). This must be PASSed with Share "Y" to return the value.

<trans_error> returns any addiitonal error messages from the translation (Required). This must be PASSed with Share "Y" to return the value.

<source_text> is the text you want translated (Required).

<from_lang> is the language ID that identifies <source_text> (Required). This must be a valid language code as defined in Appx System Administration.

<to_lang> is the languge Id you want <source_text> translated to (Required). This must be a valid language code as defined in Appx System Administration.

<trans_type> is the type of translation desired (Optional). Must be one of Field, Token, Clause, Message or Text. Defaults to Field if not PASSed, or is blank.

Text:One or more paragraphs
Clause:One or more words or phrases within a sentence
Token:A TOKEN field or an ALPHA field with table values consisting of a word or a phrase which requires an exact match with a Token entry in the dictionary.
Message:Text from the system MESSAGE file requires an exact match with a Message entry in the dictionary.
Field:One or more phrases and words.

<trans_app_id> is the Application Id whose dictionaries should be used for the translation (Optional). Defaults to the current application if not PASSed, or is blank.

<trans_ver_id> is the Version Id whose dictionaries should be used for the translation (Optional). Defaults to the current version if not PASSed, or is blank.

If <trans_text> is too small to contain the translated text, --- .CONVERT TRANSLATE will contain 'Data was truncated'.

Note that this routine will return the <source_text> in the <trans_text> field if it is unable to translate <source_text>. In other word, you will always get something back from this routine, either the translated text, or as best a translation as possible. This is especially true if you are translating text which contain paragraphs or sentences. The translation routine always starts with the largest block of text and works it's way down until it has attempted everything. If it can find a match for the enter block of text, it will return that. If not, it will then look for matches of the paragraphs in the text. If it can find a match for the paragraph, it will return that. If not, it will look for matches at the sentence level. If it still cannot find a match, it will attempt to translate individual words, depending on the "Translate Words" setting on the <from_lang> file. Thus the result returned could be a mix of the original text and the portions that were able to be translated.

Application Design Manual                                         "Powered by Appx Software"

1219

©2006 By APPX Software, Inc. All Rights Reserved